//测试mysql接口
//主路由
let express = require("express"); //绝对路径
// let query = require("../db/mysql");
//引入子路由
let userRouter = require("./modules/users"); //用户管理子路由
//创建路由对象
let Router = express.Router(); //Router==app

// let sql = "SELECT * FROM user_inf WHERE name='malin'";
// query(sql, (result) => {
//   console.log(result);
// });

//测试
// let sql = "SELECT * FROM user_inf2 WHERE name='malin'";
// let p = query(sql);
// p.then((res) => {
//   console.log(res, "成功的数据"); // [{},{}]
// }).catch((err) => {
//   console.log(err, "错误");
// });
// console.log(p);

Router.use("/user", userRouter); //用户管理子路由

module.exports = Router; //导出主路由
